﻿using System;
using System.Collections.Generic;
using System.Text;
using ElevatorLib;

namespace AnalysisLib
{
    /// <summary>
    /// 电梯分析类，获得Elevator类中不可见的属性
    /// </summary>
    public class ElevatorAccessor
    {
        private Elevator e;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="_e">电梯</param>
        public ElevatorAccessor(Elevator _e)
        {
            e = _e;
        }
        /// <summary>
        /// e.currentFloor
        /// </summary>
        public int CurrentFloor
        {
            get
            {
                return e.currentFloor;
            }
            set
            {
                e.currentFloor = value;
            }
        }
        /// <summary>
        /// e.targetFloor
        /// </summary>
        public int TargetFloor
        {
            get
            {
                return e.targetFloor;
            }
            set
            {
                e.targetFloor = value;
            }
        }
        /// <summary>
        /// e.peopleCount
        /// </summary>
        public int PeopleCnt
        {
            get
            {
                return e.peopleCount;
            }
            set
            {
                e.peopleCount = value;
            }
        }
        /// <summary>
        /// e.peopleInCar
        /// </summary>
        public Dictionary<int, Queue<Person>> PeopleInCar
        {
            get
            {
                return e.peopleInCar;
            }
            set
            {
                e.peopleInCar = value;
            }
        }
    }
}
